<!DOCTYPE html><html lang="zh-CN" data-theme="dark"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>北城韩雨 - 一个前端界的小学生</title><meta name="author" content="北城韩雨"><meta name="copyright" content="北城韩雨"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#0d0d0d"><meta name="description" content="一个前端界的小学生">
<meta property="og:type" content="website">
<meta property="og:title" content="北城韩雨">
<meta property="og:url" content="http://example.com/page/5/index.html">
<meta property="og:site_name" content="北城韩雨">
<meta property="og:description" content="一个前端界的小学生">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/img/my.jpg">
<meta property="article:author" content="北城韩雨">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/img/my.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="http://example.com/page/5/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'mediumZoom',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '北城韩雨',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2021-08-02 17:15:25'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/css/custom.css"  media="defer" onload="this.media='all'"><link rel="stylesheet" href="/css/coin.css"  media="defer" onload="this.media='all'"><link rel="stylesheet" href="/css/liuxing.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/l-lin/font-awesome-animation/dist/font-awesome-animation.min.css"  media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zhheo/JS-Heo@main/bb/showbb_in_index.css"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" media="print" onload="this.media='screen'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/l-lin/font-awesome-animation/dist/font-awesome-animation.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-butterfly-tag-plugins-plus/lib/tag_plugins.min.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.3.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/img/my.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">65</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">23</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">21</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/"><i class="fa-fw fas fa-home faa-tada"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/shuoshuo/"><i class="fa-fw fas fa-archive faa-tada"></i><span> 叨逼叨</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/tags/"><i class="fa-fw fas fa-tags faa-tada"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/categories/"><i class="fa-fw fas fa-folder-open faa-tada"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/link/"><i class="fa-fw fas fa-link faa-tada"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/comments/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-message"></use></svg><span> 留言板</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/about/"><i class="fa-fw fas fa-heart faa-tada"></i><span> 个人简介</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('/img/bg2.jpeg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">北城韩雨</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/"><i class="fa-fw fas fa-home faa-tada"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/shuoshuo/"><i class="fa-fw fas fa-archive faa-tada"></i><span> 叨逼叨</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/tags/"><i class="fa-fw fas fa-tags faa-tada"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/categories/"><i class="fa-fw fas fa-folder-open faa-tada"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/link/"><i class="fa-fw fas fa-link faa-tada"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/comments/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-message"></use></svg><span> 留言板</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/about/"><i class="fa-fw fas fa-heart faa-tada"></i><span> 个人简介</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">北城韩雨</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="/wangzhengvslike@163.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div id="scroll-down"><i class="fas fa-bell scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="bbTimeList container" id="bbTimeList" onclick="window.open('/shuoshuo/','_self')"><bblogo onclick="location='/shuoshuo/'" title="即刻短文" style="font-size: 2rem;"></bblogo><div class="swiper-container" id="bbtalk"><div class="swiper-wrapper" id="bber-talk"></div></div><i class="bber-gotobb fas fa-arrow-circle-right" onclick="location='/shuoshuo/'" title="查看全文"></i></div><div class="js-pjax"><script>var bbShortApiUrl = "https://7477-twikoo-4gkyxol6e825079a-1306570258.tcb.qcloud.la/json/bber.json?sign=cfe19172dcf9e18f67123e3da26cb579&t=1627461876"</script><script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js" data-pjax=""></script><script src="https://cdn.jsdelivr.net/gh/zhheo/JS-Heo@main/bb/showbb_in_index.js" data-pjax="" defer=""></script></div><div class="recent-post-item" style="height:auto;width:100%;padding:0px;"><div id="categoryBar"><ul class="categoryBar-list"><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/Gin-Vue-Admin/">Gin-Vue-Admin</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/JS%E9%AB%98%E7%BA%A7/">JS高级</a><span class="categoryBar-list-count">4</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/JavaScript/">JavaScript</a><span class="categoryBar-list-count">2</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/Node/">Node</a><span class="categoryBar-list-count">4</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/React/">React</a><span class="categoryBar-list-count">3</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/TS/">TS</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/Vue/">Vue</a><span class="categoryBar-list-count">4</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/webpack/">webpack</a><span class="categoryBar-list-count">3</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E5%89%8D%E7%AB%AF%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/">前端性能优化</a><span class="categoryBar-list-count">2</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E5%8E%9F%E7%94%9FJs/">原生Js</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E5%8E%9F%E7%94%9Fjs/">原生js</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E5%BE%AE%E4%BF%A1/">微信</a><span class="categoryBar-list-count">2</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/">性能优化</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E6%95%B0%E6%8D%AE%E5%BA%93/">数据库</a><span class="categoryBar-list-count">4</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%B8%B2%E6%9F%93/">服务端渲染</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E6%BA%90%E7%A0%81/">源码</a><span class="categoryBar-list-count">15</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E7%AE%97%E6%B3%95/">算法</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E7%BB%84%E4%BB%B6%E5%B0%81%E8%A3%85/">组件封装</a><span class="categoryBar-list-count">4</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E8%99%9A%E6%8B%9FDom/">虚拟Dom</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/">设计模式</a><span class="categoryBar-list-count">1</span></li><li class="categoryBar-list-item"><a class="categoryBar-list-link" href="/categories/%E9%A1%B9%E7%9B%AE%E5%AE%9E%E6%88%98/">项目实战</a><span class="categoryBar-list-count">9</span></li></ul></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/03/27/MongoDB%E5%9F%BA%E7%A1%80/" title="MongoDB基础">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-07-17%2F3eca5394963b50e37b7be2ba320029ec%2F00003.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530644&amp;t=10679b5732c52e39eeb588040240a790" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="MongoDB基础"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/27/MongoDB%E5%9F%BA%E7%A1%80/" title="MongoDB基础">MongoDB基础</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-26T16:00:00.000Z" title="发表于 2019-03-27 00:00:00">2019-03-27</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E6%95%B0%E6%8D%AE%E5%BA%93/">数据库</a></span></div><div class="content">数据库之间的区别12341.数据库分为关系形数据库和非关系形数据库2.非关系型数据就是减少了关系型数据库的一些功能 然后价格也十分的便宜3.关系型数据库的数据结构 数据库 -&gt; 数据表 -&gt; 数据行(就是一行一行的数据)4.非关系数据库结构 数据库 -&gt; 集合(理解为数据表) -&gt; 文件(理解为一行一行的数据)
基本操作11.这里面可以写类似js的代码 如声明变量 或者 声明函数
基本命令12345678910111213show dbs 查看链接中的所有数据库 如果库没有集合 就不会显示use 数据库名称 使用数据库 进入数据库 如果当前没有这个库 使用这个命令就会新建show collections 查看当前数据库中的集合db 查看当前在哪个数据库db.集合名称 在数据库新建一个集合//下面我们一user集合名称举例db.user.insert(&#123;&quot;name&quot;:&quot;wangzheng&quot;&#125;)  //在user的集合里插入一个数据文件db.user.find()  //显示user下面的所有文件db.us ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/03/26/koa%E4%B8%8Emongoose/" title="Koa与mongoose">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-07-17%2F3eca5394963b50e37b7be2ba320029ec%2F00003.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530644&amp;t=10679b5732c52e39eeb588040240a790" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Koa与mongoose"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/26/koa%E4%B8%8Emongoose/" title="Koa与mongoose">Koa与mongoose</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-25T16:00:00.000Z" title="发表于 2019-03-26 00:00:00">2019-03-26</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Node/">Node</a></span></div><div class="content">koa正常流程121.安装 koa2.创建服务
12345678910index.js -&gt; 创建服务代码const Koa =  require(&#x27;koa&#x27;)const app = new Koa()app.use((ctx,next) =&gt; &#123;    //这里就返回了数据    ctx.body =[ &#123;        name:&#x27;koa&#x27;    &#125;]&#125;)app.listen(3000)
123456789101112131415161718const Koa =  require(&#x27;koa&#x27;)const app = new Koa()app.use((ctx,next) =&gt; &#123;    ctx.body =[ &#123;        name:&#x27;koa&#x27;    &#125;]    //这里切记要加next() 否则我们下面的无法访问    next()&#125;)app.use((ctx,next) =&gt; &#123;  ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/03/25/Node/" title="NodeJs">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2016-12-29%2F0604092c7129acd0f4029c6728db7fd7%2F00001.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530724&amp;t=333c5056a813a542419e5b661ebcfcd9" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="NodeJs"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/25/Node/" title="NodeJs">NodeJs</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-24T16:00:00.000Z" title="发表于 2019-03-25 00:00:00">2019-03-25</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Node/">Node</a></span></div><div class="content">node 基础node的常用模块121.核心模块 global buffer module process 2.内置模块 os fs path http event
123451.核心模块buffer 主要处理二进制数据流 alloc from write contact toStringmodule 比如 require(引入模块) module.exports(导出模块) 2.内置模块os(内存) fs(读取文件) path(路径) http(协议) event(事件)
123456//示例const os = require(&#x27;os&#x27;) //内存模块//比如我现在想看 内存使用了多少// os.freemem() 空闲内存量 os.totalmem() 总内存量const men = os.freemem() / os.totalmem()console.log(&#x27;内存使用情况&#x27;,men)
下载11.用node 第三方包 去下载github 上下载一个东西 第三方包 download-git-repo
12345const download ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/03/25/koa/" title="Koa2">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-07-17%2F3eca5394963b50e37b7be2ba320029ec%2F00003.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530644&amp;t=10679b5732c52e39eeb588040240a790" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Koa2"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/25/koa/" title="Koa2">Koa2</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-24T16:00:00.000Z" title="发表于 2019-03-25 00:00:00">2019-03-25</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Node/">Node</a></span></div><div class="content">koa正常流程121.安装 koa2.创建服务
12345678910index.js -&gt; 创建服务代码const Koa =  require(&#x27;koa&#x27;)const app = new Koa()app.use((ctx,next) =&gt; &#123;    //这里就返回了数据    ctx.body =[ &#123;        name:&#x27;koa&#x27;    &#125;]&#125;)app.listen(3000)
123456789101112131415161718const Koa =  require(&#x27;koa&#x27;)const app = new Koa()app.use((ctx,next) =&gt; &#123;    ctx.body =[ &#123;        name:&#x27;koa&#x27;    &#125;]    //这里切记要加next() 否则我们下面的无法访问    next()&#125;)app.use((ctx,next) =&gt; &#123;  ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/03/24/%E7%A7%BB%E5%8A%A8%E7%AB%AF%E7%BE%8E%E9%A3%9FwebAPP-react/" title="webAPP 美食项目">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcz-video-photo.oss-cn-beijing.aliyuncs.com%2F20191017%2F4cfc341591d242327b67e9ceb6953612_00002.jpg&amp;refer=http%3A%2F%2Fcz-video-photo.oss-cn-beijing.aliyuncs.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530702&amp;t=80943e12d5239f63beafd6d1c540855f" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="webAPP 美食项目"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/24/%E7%A7%BB%E5%8A%A8%E7%AB%AF%E7%BE%8E%E9%A3%9FwebAPP-react/" title="webAPP 美食项目">webAPP 美食项目</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-23T16:00:00.000Z" title="发表于 2019-03-24 00:00:00">2019-03-24</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E9%A1%B9%E7%9B%AE%E5%AE%9E%E6%88%98/">项目实战</a></span></div><div class="content">项目概述12341.主要是用react 一系列技术栈 搭建的webAPP 美食项目2.主要技术栈 有react react-redux react-router-dom redux redux-saga ui 是 手机的 antd3.数据模拟 使用的json-server 数据是后写的 3.主要功能演示如下

项目功能123451.底部的tab 菜单 使用配置文件的方式去写的2.头部 公共的header 我们点击tab的每一项目的时候 头部的标题都会跟着改变 但是点击到分类的时候 这个头部又和其他菜单的不一样3.页面的请求有些事公共数据 异步请求这里 使用的redux-saga 和 redux 去实现的4.当点击分类的时候 头部的是显示分类和食材 并且点击之后 显示不同的页面 这个是用路由去写的5.当点击更多的时候 是否显示地图 点击切换之后 可以看见 tab的美食地图菜单不见了 实现了动态的切换
功能逻辑极代码底部tab菜单12341.我们使用的ant的UI组件库 它题库了tab的使用2.这我们采用配置文件的形式 去我们的底部菜单 这样也方便我们更改3.每次点击的时候 我们都会想re ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/03/23/React%E7%BB%84%E4%BB%B6%E7%AF%87/" title="React高阶应用">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2016-12-29%2F0604092c7129acd0f4029c6728db7fd7%2F00001.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530724&amp;t=333c5056a813a542419e5b661ebcfcd9" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="React高阶应用"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/23/React%E7%BB%84%E4%BB%B6%E7%AF%87/" title="React高阶应用">React高阶应用</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-22T16:00:00.000Z" title="发表于 2019-03-23 00:00:00">2019-03-23</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/React/">React</a></span></div><div class="content">React组件组件的优化场景一1234561. 现在我们就两个页面 一个是home页面 访问 路径是&#x27;/&#x27; 一个是demo页面 访问路径是 &#x27;/demo&#x27;2. demo 页面里 我们会有一个计数器的功能 当页面一跳转到 这里的时候 开始起一个定时器 然后累加数目3. 这个时候 我们离开demo页面 去 home页面  就会报错 4. 报错原因 是因为我们离开demo的时候 没有停止定时器 他还在走 5. 所以我们需要在 componentWillUnmount 的时候 停止这个定时器6. 其实不光定时器 比如网络请求 和 事件监听 在组件销毁的时候我们都必须移除
1234567891011121314151617181920212223242526272829import React from &#x27;react&#x27;let timerID class Demo extends React.Component&#123;    state = &#123;        count:0     &#125;    //这里我们开启了定时 ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/03/23/react%20%E7%99%BB%E5%BD%95%E6%B3%A8%E5%86%8C/" title="React 登录注册逻辑">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-12-05%2F66b696ea615f3567a32b65f93611a814%2F00004.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530687&amp;t=c2e3c97de6dbdc29e77593d5f4dc7fb5" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="React 登录注册逻辑"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/23/react%20%E7%99%BB%E5%BD%95%E6%B3%A8%E5%86%8C/" title="React 登录注册逻辑">React 登录注册逻辑</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-22T16:00:00.000Z" title="发表于 2019-03-23 00:00:00">2019-03-23</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E9%A1%B9%E7%9B%AE%E5%AE%9E%E6%88%98/">项目实战</a></span></div><div class="content">React 登录注册逻辑创建项目1231. create-react-app login-react-project2. 删除了一些无用的文件如 app.css index.css等3. 安装依赖 logger-redux(用来打印redux流程日志) redux-thunk(用来在redux中发送异步请求) redux(公共数据管理) react-reudx(redux便捷工具)
redux 和 reducer的配置11. 创建一个reducer的文件夹 里面有 auth.js(管理权限的reducer)  和 index.js(所有reducer的汇总)
1234567//auth.js 用来存放 权限的公共数据 比如 登录export function auth(state = &#123;&#125;,action) &#123;    switch(action.type)&#123;        default:        return state    &#125;&#125;
12345678//index.js 用来 合并所有的reducer的文件import  ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/03/22/%E6%B5%8F%E8%A7%88%E5%99%A8%E5%BA%95%E5%B1%82%E6%B8%B2%E6%9F%93%E6%9C%BA%E5%88%B6/" title="浏览器底层渲染机制">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-07-17%2Faf41dabad727ba80c9ca8a2bfbd22a58%2F00004.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530659&amp;t=bbcfe1e86f393eecbb0722db1b92e475" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="浏览器底层渲染机制"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/22/%E6%B5%8F%E8%A7%88%E5%99%A8%E5%BA%95%E5%B1%82%E6%B8%B2%E6%9F%93%E6%9C%BA%E5%88%B6/" title="浏览器底层渲染机制">浏览器底层渲染机制</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-21T16:00:00.000Z" title="发表于 2019-03-22 00:00:00">2019-03-22</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E5%89%8D%E7%AB%AF%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/">前端性能优化</a></span></div><div class="content">浏览器底层渲染机制打开页面输入网址121. 客服端会从服务器获取需要渲染页面的源代码2. 然后开辟一个GUI渲染线程 自上而下解析代码 最后绘制出对应的页面
关于CSS资源加载123451. 遇到的是偶 &lt;style&gt; 内嵌样式 由于这些直接就在我们源代码上 所以直接 就同步的 交给GUI渲染线程解析2. 如果遇到 &lt;link&gt; 外链样式 就会在开辟一个 HTTP网络资源请求线程 不等到 我们link标签的资源请求回来 GUI渲染线程继续向下渲染3. 等到GUI渲染线程同步 也就是自上向下的操作都处理完成后 再把基于HTTP网络线程请求回来的资源 文件进行解析渲染4. @import 导入样式 也会从服务器获取资源 也会开辟一个HTTP请求显现 去请求资源文件 但是他是同步的 需要等到import 请求的资源回来之后 GUI 才会向下走 一般不会用这这种方式5. 向link这里 在同一个源下 高性能浏览器 HTTP请求线程最多可以开辟 6-7个 而低版本 4-7个 这种我们叫做并发数
关于script加载123451. 遇到script 资源请求 默认都是同步的 ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/03/22/React%E5%9F%BA%E7%A1%80/" title="React基础">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcz-video-photo.oss-cn-beijing.aliyuncs.com%2F20191017%2F4cfc341591d242327b67e9ceb6953612_00002.jpg&amp;refer=http%3A%2F%2Fcz-video-photo.oss-cn-beijing.aliyuncs.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530702&amp;t=80943e12d5239f63beafd6d1c540855f" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="React基础"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/22/React%E5%9F%BA%E7%A1%80/" title="React基础">React基础</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-21T16:00:00.000Z" title="发表于 2019-03-22 00:00:00">2019-03-22</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/React/">React</a></span></div><div class="content">React基础简介121.React 起源于 Facebook 的内部项目 因为该公司对市场上 JavaScript MVC框架 都不满意 就决定自己写了一套2.两个概念 library(库) Framework(框架)
模块化与组件化121.模块化 是从代码的角度 来进行分析的(一些可复用的代码 抽离出单个的文件)2.组件的 是从UI角度 来进行的分析的 (把一些 可复用的UI元素抽离成组件)
Vue 与 React 的组件121.VUE 创建组件 是用 创建.vue文件 来创建 主要有template script style 2.React  创建组件 一切都是以js来表现的(比如模板 样式 和动作)
环境的搭建12341.基于webpack4.x搭建  需要安装npm install webpack -D npm webpack-cli -D2.我这里安装了5.x的版本 打包文件的时候 需要执行npx webpack命令 在你没有指定webpack配置文件的时候 它会自动去找src 下的 index.js 3.新建文件夹 npm -init 初始化项目 然后 新建src 入口文 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/03/21/%E5%89%8D%E7%AB%AF%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/" title="前端性能优化">     <img class="post_bg" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-07-17%2Faf41dabad727ba80c9ca8a2bfbd22a58%2F00004.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530659&amp;t=bbcfe1e86f393eecbb0722db1b92e475" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="前端性能优化"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/21/%E5%89%8D%E7%AB%AF%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/" title="前端性能优化">前端性能优化</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-03-20T16:00:00.000Z" title="发表于 2019-03-21 00:00:00">2019-03-21</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E5%89%8D%E7%AB%AF%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/">前端性能优化</a></span></div><div class="content">前端性能优化从输入url 到页面加载完成 发生了什么1234567891.用户在地址栏上输入访问地址2.浏览器通过DNS(网络服务)解析 把url解析为IP3.和IP建立tCP(三次握手什么的)链接 然后发送http请求4.服务器收到请求 查库 读文件等 拼接好返回的http响应5.浏览器收到首屏的html 开始渲染6.解析html为DOM 解析css 为css-tree7.dom + css tree 生成render树 开始告诉电脑cpu按照render树执行8.加载script的js文件9.执行js
优化的两大方向121.少加载文件 文件打包压缩 图片格式压缩 缓存 CDN缩减距离 提高加载速度 ssr(首页文件执行顺序) lazy-load(懒加载)2.少执行代码 
DNS121.查看dns缓存2.本地没有缓存 发起dns请求 像本地配置DNS服务器发请求(递归)
网络协议12345671.网络协议就是让机器聊天首先你要知道目标是谁 这个时候就是用我们的IP协议 负责寻址 这里我只负责找到是谁 至于你的内容怎么发出去我就不管了2.IP寻址之后 知道是谁了 然后就是我们的TCP( ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/page/4/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/4/#content-inner">4</a><span class="page-number current">5</span><a class="page-number" href="/page/6/#content-inner">6</a><a class="page-number" href="/page/7/#content-inner">7</a><a class="extend next" rel="next" href="/page/6/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/img/my.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">北城韩雨</div><div class="author-info__description">一个前端界的小学生</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">65</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">23</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">21</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/wazer1987"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="/wangzhengvslike@163.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content"><p>感谢访问本站，如喜欢请收藏。本站主要分享前端知识，立志成为资深前端工程师，但目前是一个前端界的小学生 若喜欢可以打赏请博主喝一杯冰阔落</p> <p>另外请大家多多支持淼哥的开源项目</p> <p>https://github.com/flipped-aurora/gin-vue-admin</p> <p>🌟🌟欢迎大家start 🌟🌟</p> <p>欢迎加入博主的前端技术交流群</p> <p style="background:rgba(255,255,255,1);margin:0"> <img src="/img/code.png"></img> </p></div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2021/04/16/gin-vue-admin/" title="Gin-Vue-Admin"><img src="/img/gin-vue-admin.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Gin-Vue-Admin"/></a><div class="content"><a class="title" href="/2021/04/16/gin-vue-admin/" title="Gin-Vue-Admin">Gin-Vue-Admin</a><time datetime="2021-04-15T16:00:00.000Z" title="发表于 2021-04-16 00:00:00">2021-04-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/01/08/Vue%E6%BA%90%E7%A0%81%E5%BC%80%E5%8F%91%E4%B9%8B%E7%BB%84%E4%BB%B6%E7%9A%84%E6%B8%B2%E6%9F%9310/" title="Vue源码开发-组件的渲染10"><img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-07-17%2F3eca5394963b50e37b7be2ba320029ec%2F00003.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530644&amp;t=10679b5732c52e39eeb588040240a790" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue源码开发-组件的渲染10"/></a><div class="content"><a class="title" href="/2021/01/08/Vue%E6%BA%90%E7%A0%81%E5%BC%80%E5%8F%91%E4%B9%8B%E7%BB%84%E4%BB%B6%E7%9A%84%E6%B8%B2%E6%9F%9310/" title="Vue源码开发-组件的渲染10">Vue源码开发-组件的渲染10</a><time datetime="2021-01-07T16:00:00.000Z" title="发表于 2021-01-08 00:00:00">2021-01-08</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/01/07/Vue%E6%BA%90%E7%A0%81%E5%BC%80%E5%8F%91%E4%B9%8B%E7%BB%84%E4%BB%B6%E7%9A%84%E5%90%88%E5%B9%B6%E7%AD%96%E7%95%A509/" title="Vue源码开发-组件合并策略09"><img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcz-video-photo.oss-cn-beijing.aliyuncs.com%2F20191017%2F4cfc341591d242327b67e9ceb6953612_00002.jpg&amp;refer=http%3A%2F%2Fcz-video-photo.oss-cn-beijing.aliyuncs.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530702&amp;t=80943e12d5239f63beafd6d1c540855f" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue源码开发-组件合并策略09"/></a><div class="content"><a class="title" href="/2021/01/07/Vue%E6%BA%90%E7%A0%81%E5%BC%80%E5%8F%91%E4%B9%8B%E7%BB%84%E4%BB%B6%E7%9A%84%E5%90%88%E5%B9%B6%E7%AD%96%E7%95%A509/" title="Vue源码开发-组件合并策略09">Vue源码开发-组件合并策略09</a><time datetime="2021-01-06T16:00:00.000Z" title="发表于 2021-01-07 00:00:00">2021-01-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/01/06/Vue%E6%BA%90%E7%A0%81%E5%BC%80%E5%8F%91%E4%B9%8B%E6%95%B0%E7%BB%84%E7%9A%84%E4%BE%9D%E8%B5%96%E6%94%B6%E9%9B%8608/" title="Vue源码开发-数组的依赖收集08"><img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-07-17%2F3eca5394963b50e37b7be2ba320029ec%2F00003.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530644&amp;t=10679b5732c52e39eeb588040240a790" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue源码开发-数组的依赖收集08"/></a><div class="content"><a class="title" href="/2021/01/06/Vue%E6%BA%90%E7%A0%81%E5%BC%80%E5%8F%91%E4%B9%8B%E6%95%B0%E7%BB%84%E7%9A%84%E4%BE%9D%E8%B5%96%E6%94%B6%E9%9B%8608/" title="Vue源码开发-数组的依赖收集08">Vue源码开发-数组的依赖收集08</a><time datetime="2021-01-05T16:00:00.000Z" title="发表于 2021-01-06 00:00:00">2021-01-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/01/06/Vue%E6%BA%90%E7%A0%81%E5%BC%80%E5%8F%91%E4%B9%8B%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E5%90%88%E5%B9%B607/" title="Vue源码开发-生命周期合并07"><img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.vjshi.com%2F2018-07-17%2Faf41dabad727ba80c9ca8a2bfbd22a58%2F00004.jpg%3Fx-oss-process%3Dstyle%2Fwatermark&amp;refer=http%3A%2F%2Fpic.vjshi.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1629530659&amp;t=bbcfe1e86f393eecbb0722db1b92e475" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue源码开发-生命周期合并07"/></a><div class="content"><a class="title" href="/2021/01/06/Vue%E6%BA%90%E7%A0%81%E5%BC%80%E5%8F%91%E4%B9%8B%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E5%90%88%E5%B9%B607/" title="Vue源码开发-生命周期合并07">Vue源码开发-生命周期合并07</a><time datetime="2021-01-05T16:00:00.000Z" title="发表于 2021-01-06 00:00:00">2021-01-06</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Gin-Vue-Admin/"><span class="card-category-list-name">Gin-Vue-Admin</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/JS%E9%AB%98%E7%BA%A7/"><span class="card-category-list-name">JS高级</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/JavaScript/"><span class="card-category-list-name">JavaScript</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Node/"><span class="card-category-list-name">Node</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/React/"><span class="card-category-list-name">React</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/TS/"><span class="card-category-list-name">TS</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Vue/"><span class="card-category-list-name">Vue</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/webpack/"><span class="card-category-list-name">webpack</span><span class="card-category-list-count">3</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/Ant-Design/" style="font-size: 1.1em; color: #999">Ant Design</a> <a href="/tags/Egg/" style="font-size: 1.1em; color: #999">Egg</a> <a href="/tags/JavaScript/" style="font-size: 1.4em; color: #99a5b6">JavaScript</a> <a href="/tags/Json-server/" style="font-size: 1.1em; color: #999">Json-server</a> <a href="/tags/Koa2/" style="font-size: 1.2em; color: #999da3">Koa2</a> <a href="/tags/Mock/" style="font-size: 1.1em; color: #999">Mock</a> <a href="/tags/MongoDB/" style="font-size: 1.2em; color: #999da3">MongoDB</a> <a href="/tags/Node/" style="font-size: 1.1em; color: #999">Node</a> <a href="/tags/Nuxt/" style="font-size: 1.1em; color: #999">Nuxt</a> <a href="/tags/React/" style="font-size: 1.3em; color: #99a1ac">React</a> <a href="/tags/React-%E5%AE%9E%E6%88%98/" style="font-size: 1.1em; color: #999">React 实战</a> <a href="/tags/TypeScript/" style="font-size: 1.2em; color: #999da3">TypeScript</a> <a href="/tags/Vue/" style="font-size: 1.5em; color: #99a9bf">Vue</a> <a href="/tags/Vue-Router/" style="font-size: 1.1em; color: #999">Vue-Router</a> <a href="/tags/Vuex/" style="font-size: 1.1em; color: #999">Vuex</a> <a href="/tags/Webpack/" style="font-size: 1.3em; color: #99a1ac">Webpack</a> <a href="/tags/jQuery/" style="font-size: 1.2em; color: #999da3">jQuery</a> <a href="/tags/web/" style="font-size: 1.2em; color: #999da3">web</a> <a href="/tags/%E5%B0%8F%E7%A8%8B%E5%BA%8F/" style="font-size: 1.1em; color: #999">小程序</a> <a href="/tags/%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B7%E9%85%8D%E7%BD%AE/" style="font-size: 1.1em; color: #999">微信公众号配置</a> <a href="/tags/%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%B8%B2%E6%9F%93/" style="font-size: 1.2em; color: #999da3">服务端渲染</a> <a href="/tags/%E7%AE%97%E6%B3%95/" style="font-size: 1.1em; color: #999">算法</a> <a href="/tags/%E8%99%9A%E6%8B%9FDom/" style="font-size: 1.1em; color: #999">虚拟Dom</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/04/"><span class="card-archive-list-date">四月 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/01/"><span class="card-archive-list-date">一月 2021</span><span class="card-archive-list-count">10</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/04/"><span class="card-archive-list-date">四月 2020</span><span class="card-archive-list-count">17</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/03/"><span class="card-archive-list-date">三月 2020</span><span class="card-archive-list-count">6</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2019/03/"><span class="card-archive-list-date">三月 2019</span><span class="card-archive-list-count">31</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">65</div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">274.7k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2021-08-02T09:15:23.879Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright"><span>&copy;2017 - 2021</span><svg style="width:2em; height:2em;position: relative;top: 10px;" aria-hidden="true"><use xlink:href="#icon-Butterfly"></use></svg><span>北城韩雨</span></div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><p><a style="margin-inline:5px" target="_blank" href="https://hexo.io/"><img src="https://img.shields.io/badge/Frame-Hexo-blue?style=flat&logo=hexo" title="博客框架为Hexo"></a><a style="margin-inline:5px" target="_blank" href="https://butterfly.js.org/"><img src="https://img.shields.io/badge/Theme-Butterfly-6513df?style=flat&logo=bitdefender" title="主题采用butterfly"></a><a style="margin-inline:5px" target="_blank" href="https://www.jsdelivr.com/"><img src="https://img.shields.io/badge/CDN-jsDelivr-orange?style=flat&logo=jsDelivr" title="本站使用JsDelivr为静态资源提供CDN加速"></a></p></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/medium-zoom/dist/medium-zoom.min.js"></script><div class="js-pjax"><script>function subtitleType () {
  if (true) { 
    var typed = new Typed("#subtitle", {
      strings: "请大家多多支持淼哥的开源项目 地址在公告中,如果我一拳把自己打死了 那我算强壮还是虚弱,从来没有真正的绝境 只有心灵的迷途,Never put off till tomorrow what you can do today".split(","),
      startDelay: 300,
      typeSpeed: 150,
      loop: true,
      backSpeed: 50
    })
  } else {
    document.getElementById("subtitle").innerHTML = '请大家多多支持淼哥的开源项目 地址在公告中'
  }
}

if (true) {
  if (typeof Typed === 'function') {
    subtitleType()
  } else {
    getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
  }
} else {
  subtitleType()
}</script></div><script defer src="/live2d-widget/autoload.js"></script><script src="/js/coin.js"></script><script async src="//at.alicdn.com/t/font_2700632_3rtvhzzpl3h.js"></script><script src="/js/liuxing.js" data-pjax></script><canvas class="fireworks" mobile="false"></canvas><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/fireworks.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --><div class="js-pjax"><script async="async">var arr = document.getElementsByClassName('recent-post-item');
for(var i = 0;i<arr.length;i++){
    arr[i].classList.add('wow');
    arr[i].classList.add('animate__zoomIn');
    arr[i].setAttribute('data-wow-duration', '1s');
    arr[i].setAttribute('data-wow-delay', '0ms');
    arr[i].setAttribute('data-wow-offset', '100');
    arr[i].setAttribute('data-wow-iteration', '1');
  }</script><script async="async">var arr = document.getElementsByClassName('card-widget');
for(var i = 0;i<arr.length;i++){
    arr[i].classList.add('wow');
    arr[i].classList.add('animate__zoomIn');
    arr[i].setAttribute('data-wow-duration', '');
    arr[i].setAttribute('data-wow-delay', '');
    arr[i].setAttribute('data-wow-offset', '');
    arr[i].setAttribute('data-wow-iteration', '');
  }</script></div><script defer src="https://cdn.jsdelivr.net/gh/graingert/wow@1.3.0/dist/wow.min.js"></script><script defer src="https://cdn.jsdelivr.net/npm/hexo-butterfly-wowjs/lib/wow_init.min.js"></script><script async src="//at.alicdn.com/t/font_2032782_8d5kxvn09md.js"></script><!-- hexo injector body_end end --></body></html>